/**
 * 功能说明:
 * 功能作者:
 * 创建日期:
 * 版权归属:每特教育|蚂蚁课堂所有 www.example.com
 */
package com.itmayeidu.api.order;

import com.spring4all.swagger.EnableSwagger2Doc;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@Api("支付服务接口")
@EnableSwagger2Doc
@RestController
@EnableEurekaClient
@SpringBootApplication
public class PayApiController {

	@GetMapping("/")
	public String index() {
		return "我是支付服务项目";
	}

	@GetMapping("/getPay")
	@ApiOperation("获取之服务相关信息")
	public String getPay(){
		return "访问支付服务成功!";
	}

	@PostMapping("/getPayName")
	@ApiOperation("根据支付名称查询")
	@ApiImplicitParam(name = "payName",value = "支付名称参数",required = true,dataType = "String")
	public String getPayName(String payName){
		System.out.println("支付名称:"+payName);
		return "支付名称:"+payName;
	}

	public static void main(String[] args) {
		SpringApplication.run(PayApiController.class, args);
	}

}
